Optimal. Leaf size=210 \[ \frac {2 B^2 n^2 (a+b x) (g (a+b x))^m (i (c+d x))^{-m}}{(b c-a d) i^2 (1+m)^3 (c+d x)}-\frac {2 B n (a+b x) (g (a+b x))^m (i (c+d x))^{-m} \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(b c-a d) i^2 (1+m)^2 (c+d x)}+\frac {(a+b x) (g (a+b x))^m (i (c+d x))^{-m} \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(b c-a d) i^2 (1+m) (c+d x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.17, antiderivative size = 210, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 49, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.061, Rules used = {2563, 2342,
2341} \begin {gather*} \frac {(a+b x) (g (a+b x))^m (i (c+d x))^{-m} \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{i^2 (m+1) (c+d x) (b c-a d)}-\frac {2 B n (a+b x) (g (a+b x))^m (i (c+d x))^{-m} \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{i^2 (m+1)^2 (c+d x) (b c-a d)}+\frac {2 B^2 n^2 (a+b x) (g (a+b x))^m (i (c+d x))^{-m}}{i^2 (m+1)^3 (c+d x) (b c-a d)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2341
Rule 2342
Rule 2563
Rubi steps
\begin {align*} \int (213 c+213 d x)^{-2-m} (a g+b g x)^m \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2 \, dx &=\int \left (A^2 (213 c+213 d x)^{-2-m} (a g+b g x)^m+2 A B (213 c+213 d x)^{-2-m} (a g+b g x)^m \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+B^2 (213 c+213 d x)^{-2-m} (a g+b g x)^m \log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx\\ &=A^2 \int (213 c+213 d x)^{-2-m} (a g+b g x)^m \, dx+(2 A B) \int (213 c+213 d x)^{-2-m} (a g+b g x)^m \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \, dx+B^2 \int (213 c+213 d x)^{-2-m} (a g+b g x)^m \log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \, dx\\ &=\frac {A^2 (213 c+213 d x)^{-1-m} (a g+b g x)^{1+m}}{213 (b c-a d) g (1+m)}+\frac {2 A B (213 c+213 d x)^{-1-m} (a g+b g x)^{1+m} \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{213 (b c-a d) g (1+m)}-(2 A B) \int \frac {213^{-2-m} n (c+d x)^{-2-m} (a g+b g x)^m}{1+m} \, dx+B^2 \int (213 c+213 d x)^{-2-m} (a g+b g x)^m \log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \, dx\\ &=\frac {A^2 (213 c+213 d x)^{-1-m} (a g+b g x)^{1+m}}{213 (b c-a d) g (1+m)}+\frac {2 A B (213 c+213 d x)^{-1-m} (a g+b g x)^{1+m} \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{213 (b c-a d) g (1+m)}+B^2 \int (213 c+213 d x)^{-2-m} (a g+b g x)^m \log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \, dx-\frac {\left (2\ 213^{-2-m} A B n\right ) \int (c+d x)^{-2-m} (a g+b g x)^m \, dx}{1+m}\\ &=-\frac {2\ 213^{-2-m} A B n (c+d x)^{-1-m} (a g+b g x)^{1+m}}{(b c-a d) g (1+m)^2}+\frac {A^2 (213 c+213 d x)^{-1-m} (a g+b g x)^{1+m}}{213 (b c-a d) g (1+m)}+\frac {2 A B (213 c+213 d x)^{-1-m} (a g+b g x)^{1+m} \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{213 (b c-a d) g (1+m)}+B^2 \int (213 c+213 d x)^{-2-m} (a g+b g x)^m \log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \, dx\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.32, size = 134, normalized size = 0.64 \begin {gather*} \frac {(a+b x) (g (a+b x))^m (i (c+d x))^{-1-m} \left (A^2 (1+m)^2-2 A B (1+m) n+2 B^2 n^2+2 B (1+m) (A+A m-B n) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+B^2 (1+m)^2 \log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(b c-a d) i (1+m)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.21, size = 0, normalized size = 0.00 \[\int \left (b g x +a g \right )^{m} \left (d i x +c i \right )^{-2-m} \left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )^{2}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 799 vs. \(2 (207) = 414\).
time = 0.40, size = 799, normalized size = 3.80 \begin {gather*} \frac {{\left (2 \, B^{2} a c n^{2} + {\left (A^{2} + 2 \, A B + B^{2}\right )} a c m^{2} + 2 \, {\left (A^{2} + 2 \, A B + B^{2}\right )} a c m + {\left (A^{2} + 2 \, A B + B^{2}\right )} a c + {\left (2 \, B^{2} b d n^{2} + {\left (A^{2} + 2 \, A B + B^{2}\right )} b d m^{2} + 2 \, {\left (A^{2} + 2 \, A B + B^{2}\right )} b d m + {\left (A^{2} + 2 \, A B + B^{2}\right )} b d - 2 \, {\left ({\left (A B + B^{2}\right )} b d m + {\left (A B + B^{2}\right )} b d\right )} n\right )} x^{2} + {\left ({\left (B^{2} b d m^{2} + 2 \, B^{2} b d m + B^{2} b d\right )} n^{2} x^{2} + {\left (B^{2} b c + B^{2} a d + {\left (B^{2} b c + B^{2} a d\right )} m^{2} + 2 \, {\left (B^{2} b c + B^{2} a d\right )} m\right )} n^{2} x + {\left (B^{2} a c m^{2} + 2 \, B^{2} a c m + B^{2} a c\right )} n^{2}\right )} \log \left (\frac {b x + a}{d x + c}\right )^{2} - 2 \, {\left ({\left (A B + B^{2}\right )} a c m + {\left (A B + B^{2}\right )} a c\right )} n + {\left ({\left (A^{2} + 2 \, A B + B^{2}\right )} b c + {\left (A^{2} + 2 \, A B + B^{2}\right )} a d + {\left ({\left (A^{2} + 2 \, A B + B^{2}\right )} b c + {\left (A^{2} + 2 \, A B + B^{2}\right )} a d\right )} m^{2} + 2 \, {\left (B^{2} b c + B^{2} a d\right )} n^{2} + 2 \, {\left ({\left (A^{2} + 2 \, A B + B^{2}\right )} b c + {\left (A^{2} + 2 \, A B + B^{2}\right )} a d\right )} m - 2 \, {\left ({\left (A B + B^{2}\right )} b c + {\left (A B + B^{2}\right )} a d + {\left ({\left (A B + B^{2}\right )} b c + {\left (A B + B^{2}\right )} a d\right )} m\right )} n\right )} x - 2 \, {\left ({\left (B^{2} a c m + B^{2} a c\right )} n^{2} + {\left ({\left (B^{2} b d m + B^{2} b d\right )} n^{2} - {\left ({\left (A B + B^{2}\right )} b d m^{2} + 2 \, {\left (A B + B^{2}\right )} b d m + {\left (A B + B^{2}\right )} b d\right )} n\right )} x^{2} - {\left ({\left (A B + B^{2}\right )} a c m^{2} + 2 \, {\left (A B + B^{2}\right )} a c m + {\left (A B + B^{2}\right )} a c\right )} n + {\left ({\left (B^{2} b c + B^{2} a d + {\left (B^{2} b c + B^{2} a d\right )} m\right )} n^{2} - {\left ({\left (A B + B^{2}\right )} b c + {\left (A B + B^{2}\right )} a d + {\left ({\left (A B + B^{2}\right )} b c + {\left (A B + B^{2}\right )} a d\right )} m^{2} + 2 \, {\left ({\left (A B + B^{2}\right )} b c + {\left (A B + B^{2}\right )} a d\right )} m\right )} n\right )} x\right )} \log \left (\frac {b x + a}{d x + c}\right )\right )} {\left (i \, d x + i \, c\right )}^{-m - 2} e^{\left (m \log \left (i \, d x + i \, c\right ) + m \log \left (-i \, g\right ) + m \log \left (\frac {b x + a}{d x + c}\right )\right )}}{{\left (b c - a d\right )} m^{3} + 3 \, {\left (b c - a d\right )} m^{2} + b c - a d + 3 \, {\left (b c - a d\right )} m} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (a\,g+b\,g\,x\right )}^m\,{\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right )}^2}{{\left (c\,i+d\,i\,x\right )}^{m+2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________